-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI & UX optimization #48
Conversation
@huzhengen is attempting to deploy a commit to the OpenBuild Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/app/home/Main.js
Outdated
@@ -63,7 +63,7 @@ export function HomeMain({data}) { | |||
<button className="max-md:w-full max-md:font-normal h-14 text-lg btn btn-outline btn-primary hover:bg-gray hover:text-white md:mr-3 px-9">🎉 Join Community</button> | |||
</a> | |||
<Link href="/learn/courses"> | |||
<button className="max-md:relative max-md:mt-3 max-md:w-full max-md:font-normal h-14 text-lg relative btn btn-primary text-white pl-9 pr-2 hover:!opacity-90"> | |||
<button className="max-md:relative max-md:mt-3 max-md:w-full max-md:font-normal h-14 text-lg relative btn btn-primary text-white pl-9 max-md:pl-0 pr-2 max-md:pr-0 hover:!opacity-90"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用 max-md:px-0
即可,详见:https://tailwindcss.com/docs/padding#add-horizontal-padding
src/entry/components/Header/nav.js
Outdated
@@ -74,14 +74,14 @@ export function Navs({data}) { | |||
onClick={() => setOpenMenu(!openMenu)} | |||
href={i.link} | |||
> | |||
<li className="flex justify-between items-center font-bold h-14 text-sm"> | |||
<li className="flex justify-between items-center font-bold h-14 text-base"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文档默认就是 16px,且祖先节点中没有单独设置过字号,所以去掉 text-base
直接利用 CSS 的继承机制就行。
src/entry/components/Header/nav.js
Outdated
{i.name} | ||
<ChevronRightIcon className="h-4 w-4 opacity-60" /> | ||
</li> | ||
</Link> : ( | ||
<div key={`header-menu-${k}`} className="collapse"> | ||
<input type="radio" name={`my-accordion-${k}`} checked="checked" readOnly /> | ||
<div className="collapse-title collapse-title-sm min-h-0 h-14 text-sm font-bold flex justify-between items-center"> | ||
<div className="collapse-title collapse-title-sm min-h-0 h-14 text-base font-bold flex justify-between items-center"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上面评论
src/entry/layouts/default/Footer.js
Outdated
@@ -168,11 +168,11 @@ export function Footer() { | |||
key={`footer-menus-${k}`} | |||
className="max-md:mb-4 max-md:border-t max-md:border-[rgba(255,255,255,0.06)] max-md:pt-6 md:ml-[64px]" | |||
> | |||
<h4 className="mb-0 text-sm font-semibold max-md:mb-2 md:mb-12 md:text-lg">{i.name}</h4> | |||
<h4 className="mb-0 text-sm font-semibold max-md:mb-2 md:mb-12 md:text-lg max-md:text-base">{i.name}</h4> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不用加 max-md:text-base
,去掉 text-sm
即可,同样是利用 CSS 继承机制。
src/entry/layouts/default/Footer.js
Outdated
<ul> | ||
{i.items.map(subItem => ( | ||
<li | ||
className="text-xs leading-7 transition-all duration-300 hover:text-green hover:underline md:text-sm md:leading-10" | ||
className="text-xs leading-7 transition-all duration-300 hover:text-green hover:underline md:text-sm max-md:leading-7 max-md:text-sm md:leading-10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不用加 max-md:leading-7
和 max-md:text-sm
,去掉 text-xs
并把 md:text-sm
改为 text-sm
就行。
src/app/learn/[type]/[id]/Author.js
Outdated
<div className="ml-4"> | ||
<h4 className="text-sm font-bold md:text-lg"> | ||
<div className="ml-4 flex-1"> | ||
<h4 className="text-sm font-bold md:text-lg max-md:text-lg"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不用加 max-md:text-lg
,去掉 text-sm
并把 md:text-lg
改成 text-lg
就行。
src/app/learn/[type]/[id]/Author.js
Outdated
<a href={`/u/${data?.team_user?.user_handle}`}>{data?.team_user?.user_nick_name}</a> | ||
</h4> | ||
<p className="text-xs text-gray-500 md:text-sm"> | ||
<p className="text-xs text-gray-500 md:text-sm max-md:text-sm"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不用加 max-md:text-sm
,去掉 text-xs
并把 md:text-sm
改成 text-sm
就行。
solved #44